package com.example.two.service;

import com.example.two.domain.User;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public interface UserService {


    User getUserById(Long id);

    List<User> getAll();

    boolean insert(User user);

    boolean update(User user);

    boolean delete(Long id);

    User  getUserWithOrders(Long id);

    List<Map<String, Object>> getUserOrderCount();

    List<User> getUsersWithOrders();

    List<Map<String, Object>> countUsersByAgeGroup();

}
